<?php
$browniepoints->js('jquery-1.3.2.min.js');
$browniepoints->js('jquery.tools.min.js');
$browniepoints->js('browniepoints.js');
?><!-- 2 columns -->
<div id="cols2-top"></div>
<div id="cols2" class="box">

    <!-- Blog -->
    <div id="col-left">
<?php
if (!isset($aspect)) {
  $aspect = 'points';
}
if (isset($tabs)) {
?>
        <ul id="tabs"><?php
        echo $this->element('menu', array(
          'links' => $tabs,
          'active' => 'class="active-tab"',
          'wrapper' => '<li%active>%link<li>',
          'match_full' => TRUE)); ?></ul><hr class="tabs" />
        <span id="badge" class="f-right"><img src="/<?php echo $user['User']['email_md5']; ?>/badge.png" /></span>
<?php
}
echo $this->element('user_' . $aspect);
?>
    </div> <!-- /col-left -->

    <hr class="noscreen" />

    <!-- Profile -->
    <div id="col-right">
<?php
if ($is_own) {
?>    
        <div class="edit"><a href="#" title="Profil bearbeiten" class="ico-edit">bearbeiten</a>
          <?php echo $form->create('User', array('action' => 'edit')); ?>
            <h4>Profil bearbeiten</h4>
            <?php echo $form->input('name'); ?>
            <?php echo $form->input('email'); ?>
            <?php echo $form->input('about', array('type' => 'textarea')); ?>
          <?php echo $form->end('Speichern'); ?>
        </div>
<?php
} // is_own
else {
?>
        <div class="edit"><a href="#" title="Browniepunkt senden" class="ico-point">Punkt</a>
          <?php echo $form->create('Point', array('action' => 'add')); ?>
            <?php echo $form->input('user_id', array('type' => 'hidden', 'value' => $user['User']['id'])); ?>

<?php
if (!$account) { 
  echo $form->input('sender_name', array('label' => 'Absender: ')); 
}
?>
            <?php echo $form->input('text', array('label' => 'Text: ', 'type' => 'textarea')); ?>
<?php
if (!$account) {
?>
            <label for="chk">Bitte berechne <strong><?php echo "{$calc['a']} {$calc['op']} {$calc['b']}"; ?></strong>:
              <input name="data[chk]" size="2"/>
            </label>
<?php
}
?>
            <?php echo $form->submit("/img/design/btn-absenden.png"); ?>
          <?php echo $form->end(); ?>
        </div>
<?php
}
?>
        <h4><span><?php echo $user['User']['name']; ?></span></h4>

        <div class="box">
        
            <div class="col-right-img">
              <img src="<?php echo $user['User']['avatar']; ?>" alt="" />
            </div>
            <div class="col-right-text">
              <?php echo $user['User']['about']; ?>
            </div> <!-- /col-right-text -->
        
        </div> <!-- /box -->
    
    </div> <!-- /col-right -->

</div> <!-- /cols2 -->
<div id="cols2-bottom"></div>
